home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Graphics / TVPaint / Rexx / styx1.rx < prev    next >
Encoding:
Text File  |  1995-11-07  |  1.2 KB  |  103 lines

  1. /*    param none    */
  2.  
  3. options results
  4.  
  5. address 'rexx_TVPaint'
  6.  
  7.  
  8. /* Classic but always great...  Try also with a bigger pencil */
  9. /* press on the + and - keys during the rexxprogram is runing */
  10.  
  11.  
  12. /* reset 
  13.  
  14.     tv_UpdateUndo
  15.     tv_SetDrawMode    Color
  16.     tv_AliasOn
  17.     tv_StencilOff
  18.     tv_DensityOff
  19.     tv_CycleOff    
  20.     tv_AirSpline 10 245
  21.     tv_AirPower 10
  22.     tv_DensitySpline 255 50
  23.     tv_XMax
  24.     tv_YMax
  25.     tv_WrapX    0
  26.     tv_WrapY    0
  27.     tv_RangeV
  28.  
  29. */
  30.  
  31.     tv_GetWidth
  32.     width=result
  33.  
  34.     tv_GetHeight
  35.     height=result
  36.  
  37.     va=5
  38.     vb=6
  39.     vc=7
  40.     vd=5
  41.     a=random(0,740,time('S'))
  42.     b=random(0,576,time('S'))
  43.     c=random(0,740,time('S'))
  44.     d=random(0,576,time('S'))
  45.  
  46.     r=random(0,255,time('S'))
  47.     g=random(0,255,time('S'))
  48.     blue=random(0,255,time('S'))
  49.     wr=5
  50.     wg=6
  51.     wb=4
  52.  
  53.     do z=1 to 400
  54.         r=r+wr
  55.         if (r>255) | (r<0) then
  56.         do
  57.             wr=-wr
  58.             r=r+wr
  59.         end
  60.         g=g+wg
  61.         if (g>255) | (g<0) then
  62.         do
  63.             wg=-wg
  64.             g=g+wg
  65.         end
  66.         blue=blue+wb
  67.         if (blue>255) | (blue<0) then
  68.         do
  69.             wb=-wb
  70.             blue=blue+wb
  71.         end
  72.  
  73.         tv_SetApen r g blue
  74.  
  75.         a=a+va
  76.         if (a>width) | (a<0) then
  77.         do
  78.             va=-va
  79.             a=a+va
  80.         end
  81.         b=b+vb
  82.         if (b>height) | (b<0) then
  83.         do
  84.             vb=-vb
  85.             b=b+vb
  86.         end
  87.         c=c+vc
  88.         if (c>width) | (c<0) then
  89.         do
  90.             vc=-vc
  91.             c=c+vc
  92.         end
  93.         d=d+vd
  94.         if (d>height) | (d<0) then
  95.         do
  96.             vd=-vd
  97.             d=d+vd
  98.         end
  99.  
  100.         tv_Line a b c d
  101.         
  102.     end
  103.